{extend name="public/base" /} {block name="css"}
<link rel="stylesheet" href="__INDEX__/css/create-index.css"> {/block} {block name="container"}
<link href="__PLUGIN__/Fileinput/css/fileinput.css" rel="stylesheet">
<style>
.form-groups{width:33.3%}
.form-group{width:100%;}
.col-sm-12{padding:0px;}
.imgSelf{height:width !important;margin: 15px 0;display: block;overflow: hidden;box-sizing: border-box;border-radius: 50%;}
#table tr{text-align: center;display: flex;height: 100%;}
#table td{text-align: center;color: #000;padding: 0px;min-height: 30px;line-height: 2;}
#table input{width: 100%;text-align: center;color: #000;height: 100%;}
#table select{width: 100%;text-align: center;color: #000;height: 100%;outline: none;text-align-last: center;}
#table select option{width: 100%;text-align: center;color: #000;height: 100%;}
.main_box{font-size: 16px;color: #000;height: 40px;line-height: 40px;}
</style>
<div>
    <form action="" method="post" enctype="multipart/form-data">
        <div class="panel-body panel-body-nopadding" id="print" style="background: #ECF0F5">
            <label class="col-sm-12 control-label" style="background: #ECF0F5;text-align: left;color: #000;height: 38px;padding-left: 30px;line-height: 38px;font-size: 16px;">录入员工档案
            </label>
            <div class="col-sm-12" style="display: flex;flex-grow: row wrap;">
                <div class="col-sm-1"></div>
                <div class="form-group col-sm-10">
                    <table id="table" class="col-sm-12" cellpadding="0" cellspacing="0">
                        <tr class="col-sm-12">
                            <td class="col-sm-1">姓名</td>
                            <td class="col-sm-2"><input type="text" value="{$data.name ?? ''}" name="name"  ></td>
                            <td class="col-sm-1">性别</td>
                            <td class="col-sm-2">
                                <input type="radio" value="1" name="sex" style="float: left;width:15%;height: 45% !important;margin-top: 8px;margin-left: 5px;"><span style="float: left;font-size: 14px;color: #000;line-height: 2;">男</span>
                                <input type="radio" value="2" name="sex" style="float: left;width:15%;height: 45% !important;margin-top: 8px;margin-left: 15px;"><span style="float: left;font-size: 14px;color: #000;line-height: 2;">女</span>
                                <td class="col-sm-1">出生日期</td>
                                <td class="col-sm-2"><input id="hello" class="laydate-icon form-control layer-date" style="margin-top:-5px !important;" name="birthday" value="{$data.birthday ?? ''}"></td>
                                <td class="col-sm-1">身份证号码</td>
                                <td class="col-sm-2"><input type="text" value="{$data.sf_num ?? ''}" name="sf_num"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-1">民族</td>
                                <td class="col-sm-2">
                                    <select name="mingzu">  
                                        <option value="汉族">汉族</option>  
                                        <option value="蒙古族">蒙古族</option>  
                                        <option value="回族">回族</option>  
                                        <option value="藏族">藏族</option>  
                                        <option value="维吾尔族">维吾尔族</option>  
                                        <option value="苗族">苗族</option>  
                                        <option value="彝族">彝族</option>  
                                        <option value="壮族">壮族</option>  
                                        <option value="布依族">布依族</option>  
                                        <option value="朝鲜族">朝鲜族</option>  
                                        <option value="满族">满族</option>  
                                        <option value="侗族">侗族</option>  
                                        <option value="瑶族">瑶族</option>  
                                        <option value="白族">白族</option>  
                                        <option value="土家族">土家族</option>  
                                        <option value="哈尼族">哈尼族</option>  
                                        <option value="哈萨克族">哈萨克族</option>  
                                        <option value="傣族">傣族</option>  
                                        <option value="黎族">黎族</option>  
                                        <option value="傈僳族">傈僳族</option>  
                                        <option value="佤族">佤族</option>  
                                        <option value="畲族">畲族</option>  
                                        <option value="高山族">高山族</option>  
                                        <option value="拉祜族">拉祜族</option>  
                                        <option value="水族">水族</option>  
                                        <option value="东乡族">东乡族</option>  
                                        <option value="纳西族">纳西族</option>  
                                        <option value="景颇族">景颇族</option>  
                                        <option value="柯尔克孜族">柯尔克孜族</option>  
                                        <option value="土族">土族</option>  
                                        <option value="达斡尔族">达斡尔族</option>  
                                        <option value="仫佬族">仫佬族</option>  
                                        <option value="羌族">羌族</option>  
                                        <option value="布朗族">布朗族</option>  
                                        <option value="撒拉族">撒拉族</option>  
                                        <option value="毛南族">毛南族</option>  
                                        <option value="仡佬族">仡佬族</option>  
                                        <option value="锡伯族">锡伯族</option>  
                                        <option value="阿昌族">阿昌族</option>  
                                        <option value="普米族">普米族</option>  
                                        <option value="塔吉克族">塔吉克族</option>  
                                        <option value="怒族">怒族</option>  
                                        <option value="乌孜别克族">乌孜别克族</option>  
                                        <option value="俄罗斯族">俄罗斯族</option>  
                                        <option value="鄂温克族">鄂温克族</option>  
                                        <option value="德昂族">德昂族</option>  
                                        <option value="保安族">保安族</option>  
                                        <option value="裕固族">裕固族</option>  
                                        <option value="京族">京族</option>  
                                        <option value="塔塔尔族">塔塔尔族</option>  
                                        <option value="独龙族">独龙族</option>  
                                        <option value="鄂伦春族">鄂伦春族</option>  
                                        <option value="赫哲族">赫哲族</option>  
                                        <option value="门巴族">门巴族</option>  
                                        <option value="珞巴族">珞巴族</option>  
                                        <option value="基诺族">基诺族</option>  
                                    </select> 
                                </td>
                                <td class="col-sm-1">年龄</td>
                                <td class="col-sm-2"><input type="text" value="{$data.age ?? ''}" name="age"  ></td>
                                <td class="col-sm-1">电话</td>
                                <td class="col-sm-2"><input type="text" value="{$data.phone ?? ''}" name="phone"  ></td>
                                <td class="col-sm-1">婚姻状况</td>
                                <td class="col-sm-2">
                                    <input type="radio" value="1" name="marry" style="float: left;width:15%;height: 45% !important;margin-top: 8px;margin-left: 5px;"><span style="float: left;font-size: 14px;color: #000;line-height: 2;">已婚</span>
                                    <input type="radio" value="2" name="marry" style="float: left;width:15%;height: 45% !important;margin-top: 8px;margin-left: 15px;"><span style="float: left;font-size: 14px;color: #000;line-height: 2;">未婚</span>
                                </td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-1">部门</td>
                                <td class="col-sm-2">
                                    <select name="bumen" id="">
                                        <option value="技术部">技术部</option>
                                        <option value="行政部">行政部</option>
                                        <option value="销售部">销售部</option>
                                    </select>
                                </td>
                                <td class="col-sm-1">职位</td>
                                <td class="col-sm-2"><input type="text" value="{$data.zhiwei ?? ''}" name="zhiwei"></td>
                                <td class="col-sm-1">入职时间</td>
                                <td class="col-sm-2"><input id="inTime" class="laydate-icon form-control layer-date" style="margin-top:-5px !important;" name="rz_time" value="{$data.rz_time ?? ''}"></td>
                                <td class="col-sm-1">级别</td>
                                <td class="col-sm-2">
                                    <select name="jibie" id="">
                                        <option value="暂无">暂无</option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-1">身高</td>
                                <td class="col-sm-2"><input type="text" value="{$data.height ?? ''}" name="height"  ></td>
                                <td class="col-sm-1">血型</td>
                                <td class="col-sm-2">
                                    <select name="blood" id="">
                                        <option value="O型">O型</option>
                                        <option value="A型">A型</option>
                                        <option value="B型">B型</option>
                                        <option value="AB型">AB型</option>
                                    </select>
                                </td>
                                <td class="col-sm-1">健康状况</td>
                                <td class="col-sm-2"><input type="text" value="{$data.jiankang ?? ''}" name="jiankang"></td>
                                <td class="col-sm-1">政治面貌</td>
                                <td class="col-sm-2">
                                    <select name="zhengzhi" id="">
                                        <option value="共青团员">共青团员</option>
                                        <option value="预备役党员">预备役党员</option>
                                        <option value="党员">党员</option>
                                        <option value="群众">群众</option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-1">毕业时间</td>
                                <td class="col-sm-2"><input id="graduteTime" class="laydate-icon form-control layer-date" style="margin-top:-5px !important;" name="by_time" value="{$data.by_time ?? ''}"></td>
                                <td class="col-sm-1">从业时间</td>
                                <td class="col-sm-2"><input id="workTime" class="laydate-icon form-control layer-date" style="margin-top:-5px !important;" name="cy_time" value="{$data.cy_time ?? ''}"></td>
                                <td class="col-sm-1">驾照</td>
                                <td class="col-sm-2"><input type="text" value="{$data.driving ?? ''}" name="driving"></td>
                                <td class="col-sm-1">技术职称</td>
                                <td class="col-sm-2"><input type="text" value="{$data.js_zhicheng ?? ''}" name="js_zhicheng"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-1">qq号码</td>
                                <td class="col-sm-2"><input type="text" value="{$data.qq_num ?? ''}" name="qq_num"  ></td>
                                <td class="col-sm-1">联系邮箱</td>
                                <td class="col-sm-2"><input type="text" value="{$data.email ?? ''}" name="email"  ></td>
                                <td class="col-sm-1">籍贯</td>
                                <td class="col-sm-2"><input type="text" value="{$data.jiguan ?? ''}" name="jiguan"  ></td>
                                <td class="col-sm-1">兴趣爱好</td>
                                <td class="col-sm-2"><input type="text" value="{$data.xingqu ?? ''}" name="xingqu"  ></td>
                            </tr>

                            <tr class="col-sm-12">
                                <td class="col-sm-1">毕业院校</td>
                                <td class="col-sm-2"><input type="text" value="{$data.by_school ?? ''}" name="by_school"  ></td>
                                <td class="col-sm-1">专业</td>
                                <td class="col-sm-2"><input type="text" value="{$data.major ?? ''}" name="major"  ></td>
                                <td class="col-sm-1">学历</td>
                                <td class="col-sm-2">
                                    <select name="xueli" id="">
                                        <option value="初中">初中</option>
                                        <option value="高中">高中</option>
                                        <option value="大专">大专</option>
                                        <option value="本科">本科</option>
                                        <option value="硕士">硕士</option>
                                        <option value="博士">博士</option>
                                    </select>
                                </td>
                                <td class="col-sm-1">外语等级</td>
                                <td class="col-sm-2">
                                    <select name="waiyu" id="">
                                        <option value="暂无">暂无</option>
                                        <option value="四级">四级</option>
                                        <option value="六级">六级</option>
                                        <option value="八级">八级</option>
                                    </select>
                                </td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-1">户口所在地</td>
                                <td class="col-sm-5"><input type="text" value="{$data.hk_from ?? ''}" name="hk_from"  ></td>
                                <td class="col-sm-1">现住地址</td>
                                <td class="col-sm-5"><input type="text" value="{$data.address ?? ''}" name="address"  ></td>
                            </tr>

                            <!-- 家庭成员 -->
                            <tr class="col-sm-12">
                                <td class="col-sm-12 main_box">主要家庭成员</td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">姓名</td>
                                <td class="col-sm-4">关系</td>
                                <td class="col-sm-3">工作单位</td>
                                <td class="col-sm-3">联系方式</td>
                            </tr>
                            {if condition="$Request.action eq 'update'"}
                            <?php for($i=0;$i < count($family['name']);$i++){?>
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value="{$family['name'][$i]}"  name="family[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value="{$family['guanxi'][$i]}" name="family[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value="{$family['company'][$i]}" name="family[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value="{$family['phone'][$i]}" name="family[phone][]]"></td>
                            </tr>
                            <?php }?>
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value=""  name="family[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value=""  name="family[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[phone][]]"></td>
                            </tr>
                            {else }
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value=""  name="family[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value=""  name="family[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[phone][]]"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value=""  name="family[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value=""  name="family[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[phone][]]"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value=""  name="family[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value=""  name="family[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value=""  name="family[phone][]]"></td>
                            </tr>
                            {/if}
                            <!-- 教育经历 -->
                            <tr class="col-sm-12">
                                <td class="col-sm-12 main_box">教育经历(初中起)</td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">起止时间</td>
                                <td class="col-sm-4">院校</td>
                                <td class="col-sm-2">专业</td>
                                <td class="col-sm-2">毕(结、肄)业</td>
                                <td class="col-sm-2">证明人</td>
                            </tr>
                            {if condition="$Request.action eq 'update'"}
                            <?php for($i = 0 ;$i < count($education['kaishi']);$i++){?>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="start{$i}" name="jiaoyu[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;" value="{$education['kaishi'][$i]}"  >
                                    <input placeholder="结束日期" class="form-control layer-date" id="end{$i}" name="jiaoyu[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;" value="{$education['jieshu'][$i]}"  >
                                </td>
                                <td class="col-sm-4"><input type="text" value="{$education['school'][$i]}" name="jiaoyu[school][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="{$education['zhuanye'][$i]}" name="jiaoyu[zhuanye][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="{$education['biye'][$i]}" name="jiaoyu[biye][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="{$education['zhengming'][$i]}" name="jiaoyu[zhengming][]]"  ></td>
                            </tr>  
                            <?php }?>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="start5" name=" jiaoyu[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="end5" name="jiaoyu[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="jiaoyu[school][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhuanye][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[biye][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhengming][]]"></td>
                            </tr> 
                            {else /}
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="start0" name="jiaoyu[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;"  >
                                    <input placeholder="结束日期" class="form-control layer-date" id="end0" name="jiaoyu[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;"  >
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="jiaoyu[school][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhuanye][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[biye][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhengming][]]"  ></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="start1" name=" jiaoyu[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;"  >
                                    <input placeholder="结束日期" class="form-control layer-date" id="end1" name="jiaoyu[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;"  >
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="jiaoyu[school][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhuanye][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[biye][]]"  ></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhengming][]]"  ></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="start2" name=" jiaoyu[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="end2" name="jiaoyu[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="jiaoyu[school][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhuanye][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[biye][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhengming][]]"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="start3" name=" jiaoyu[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="end3" name="jiaoyu[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="jiaoyu[school][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhuanye][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[biye][]]"></td>
                                <td class="col-sm-2"><input type="text" value="" name="jiaoyu[zhengming][]]"></td>
                            </tr>
                            {/if}
                            <!-- 工作经历 -->
                            <tr class="col-sm-12">
                                <td class="col-sm-12 main_box">工作经历</td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">起止时间</td>
                                <td class="col-sm-4">单位名称</td>
                                <td class="col-sm-3">职位</td>
                                <td class="col-sm-3">证明人</td>
                            </tr>
                            {if condition="$Request.action eq 'update'"}
                            <?php for($i = 0; $i < count($work['kaishi']); $i++){?>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="workStart{$i}" name="work[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;" value="{$work['kaishi'][$i]}">
                                    <input placeholder="结束日期" class="form-control layer-date" id="workEnd{$i}" name="work[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;" value="{$work['jieshu'][$i]}">
                                </td>
                                <td class="col-sm-4"><input type="text" value="{$work['company'][$i]}" name="work[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value="{$work['zhiwei'][$i]}" name="work[zhiwei][]]"></td>
                                <td class="col-sm-3"><input type="text" value="{$work['zhengming'][$i]}" name="work[zhengming][]]"></td>
                            </tr>
                            <?php }?>
                              <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="workStart5" name="work[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="workEnd5" name="work[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="work[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhiwei][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhengming][]]"></td>
                            </tr>
                            {else /}
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="workStart0" name="work[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="workEnd0" name="work[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="work[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhiwei][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhengming][]]"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="workStart1" name="work[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="workEnd1" name="work[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="work[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhiwei][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhengming][]]"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">
                                    <input placeholder="开始日期" class="form-control layer-date" id="workStart2" name="work[kaishi][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                    <input placeholder="结束日期" class="form-control layer-date" id="workEnd2" name="work[jieshu][]]" style="max-width: 49% !important;margin-top: -5px !important;">
                                </td>
                                <td class="col-sm-4"><input type="text" value="" name="work[company][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhiwei][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="work[zhengming][]]"></td>
                            </tr>
                            {/if}

                            <!-- 紧急联系人 -->
                            <tr class="col-sm-12">
                                <td class="col-sm-12 main_box">紧急联系人</td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4">姓名</td>
                                <td class="col-sm-4">关系</td>
                                <td class="col-sm-3">工作单位及职务</td>
                                <td class="col-sm-3">电话</td>
                            </tr>
                            {if condition="$Request.action eq 'update'"}
                            <?php for($i = 0; $i < count($contact['name']);$i++ ){?>
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value="{$contact['name'][$i]}" name="contact[name][]]"  ></td>
                                <td class="col-sm-4"><input type="text" value="{$contact['guanxi'][$i]}" name="contact[guanxi][]]"  ></td>
                                <td class="col-sm-3"><input type="text" value="{$contact['gongzuo'][$i]}" name="contact[gongzuo][]]"  ></td>
                                <td class="col-sm-3"><input type="text" value="{$contact['phone'][$i]}" name="contact[phone][]]"  ></td>
                            </tr>
                            <?php }?>
                             <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value="" name="contact[name][]]"  ></td>
                                <td class="col-sm-4"><input type="text" value="" name="contact[guanxi][]]"  ></td>
                                <td class="col-sm-3"><input type="text" value="" name="contact[gongzuo][]]"  ></td>
                                <td class="col-sm-3"><input type="text" value="" name="contact[phone][]]"  ></td>
                            </tr>
                            {else /}

                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value="" name="contact[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value="" name="contact[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="contact[gongzuo][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="contact[phone][]]"></td>
                            </tr>
                            <tr class="col-sm-12">
                                <td class="col-sm-4"><input type="text" value="" name="contact[name][]]"></td>
                                <td class="col-sm-4"><input type="text" value="" name="contact[guanxi][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="contact[gongzuo][]]"></td>
                                <td class="col-sm-3"><input type="text" value="" name="contact[phone][]]"></td>
                            </tr>
                            {/if}
                        </table>
                        <div class="form-group">
                            <label class="col-sm-3 control-label" style="line-height: 10;text-align: center;">员工照片</label>
                            <div class="col-sm-6" >
                                <input id="fileone" type="file" class="file-loading">
                                <input type="hidden" id="picurl" placeholder="缩略图" name="picurl" value="{$data.picurl ?? ''}">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-1"></div>
                </div>

                <div class="panel-footer">
                    <div class="row">
                        <div class="col-sm-6 col-sm-offset-6">
                            <input type="hidden" name="id" value="">
                            <button type="submit" class="btn btn-primary" onclick="" style="margin:0 auto;">提交</button>
                        </div>
                    </div>
                </div>
                <!-- panel-footer -->
            </div>
        </form>
    </div>


    {/block} {block name="js"}
    <script src="__PLUGIN__/Fileinput/js/fileinput.js"></script>
    <script src="__INDEX__/js/plugins/layer/laydate/laydate.js"></script>
    <script>
     $(document).ready(function() {
        fileinputOne("fileone","picurl");
    });
     $(function(){
        $("[name='mingzu']").find("[value='{$data.mingzu ?? '汉族'}']").attr("selected", true);/*判断选中名族*/
        $("[name='xueli']").find("[value='{$data.xueli ?? '初中'}']").attr("selected",true);/*判断选中的学历*/
        $("[name='zhengzhi']").find("[value='{$data.zhengzhi ?? '共青团员'}']").attr("selected",true);/*判断选中的政治面貌*/
        $("[name='blood']").find("[value='{$data.blood ?? 'O型'}']").attr("selected",true);/*判断选中的血型*/
        $("[name='waiyu']").find("[value='{$data.waiyu ?? '暂无'}']").attr("selected",true);/*判断选中的学历*/
        $("[name='bumen']").find("[value='{$data.bumen ?? '销售部'}']").attr("selected",true);/*判断选中的部门*/ 
        $("[name='sex'][value='{$data.sex ?? '1'}']").attr("checked", true);/*判断选中性别*/
        $("[name='marry'][value='{$data.marry ?? '2'}']").attr("checked", true);/*判断选中婚否*/
    });
</script>
<script>
    function fileinputOne(fileid,field){
      var widths = arguments[2] ? arguments[2] : 'auto';//设置默认的图片宽度
      var heights = arguments[3] ? arguments[3] : '160px';//设置默认的图片高度
      //单图上传
      var $input = $("#"+fileid);
      var $picurl = $("#"+field); 
      
      var $Preview =[];
      var $Config =[];
      if($picurl.val()!=''){
       $Preview =["<img class='kv-preview-data file-preview-image' style='width:"+widths+";height:"+heights+";' src='"+$picurl.val()+"'>"];
       $Config =[{key: 1}];
   }

   $input.fileinput({
      uploadUrl: "{:url('index/common/upload')}",
      deleteUrl: "{:url('index/common/updel')}",
      autoReplace: true,
      overwriteInitial: true,
      showUploadedThumbs: false,
      maxFileCount: 1,
      initialPreview: $Preview,
      initialPreviewConfig: $Config,
      layoutTemplates: {actionDelete: ''}, 
  }).on("filebatchselected", function(event, files) {
              $input.fileinput("upload");//选择后自动上传
          }).on('fileuploaded', function(event, data,previewId,index) {
               //alert(JSON.stringify(data));
               var dataObj=eval("("+data.response+")");
                if(dataObj['code']==0)
                      {  
                   $picurl.val(dataObj['img']);
                      }
               else{
                swal("出错了", "上传失败,请刷新再试", "error");
                   }
        }).on("filecleared", function(event, files) {
           $picurl.val('');
       });
    }
</script>
<script>
    //外部js调用
    laydate({
        elem: '#hello', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
        event: 'focus' //响应事件。如果没有传入event，则按照默认的click
    });
    laydate({
        elem: '#inTime',
        event: 'focus'
    });
    laydate({
        elem: '#graduteTime',
        event: 'focus'
    });
    laydate({
        elem: '#workTime',
        event: 'focus'
    });
    laydate({
        elem: '#start0',
        event: 'focus'
    });
    laydate({
        elem: '#end0',
        event: 'focus'
    });
    laydate({
        elem: '#start1',
        event: 'focus'
    });
    laydate({
        elem: '#end1',
        event: 'focus'
    });
    laydate({
        elem: '#start2',
        event: 'focus'
    });
    laydate({
        elem: '#end2',
        event: 'focus'
    });
    laydate({
        elem: '#start3',
        event: 'focus'
    });
    laydate({
        elem: '#end3',
        event: 'focus'
    });
      laydate({
        elem: '#start5',
        event: 'focus'
    });
    laydate({
        elem: '#end5',
        event: 'focus'
    });
    laydate({
        elem: '#workStart0',
        event: 'focus'
    });
    laydate({
        elem: '#workEnd0',
        event: 'focus'
    });
    laydate({
        elem: '#workStart1',
        event: 'focus'
    });
    laydate({
        elem: '#workEnd1',
        event: 'focus'
    });
    laydate({
        elem: '#workStart2',
        event: 'focus'
    });
    laydate({
        elem: '#workEnd2',
        event: 'focus'
    });
    laydate({
        elem: '#workStart5',
        event: 'focus'
    });
    laydate({
        elem: '#workEnd5',
        event: 'focus'
    });

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
{/block}